(define (make-cookie-personality)
  (let ((parent (make-personality)))
    
    
    (define (interact self)
      (let ((name (ask (ask parent 'get-agent) 'name)))
        (display name)
        (display ": ")
      
      
      (cond ((eq? (ask *player* 'get-thing! (ask *cookie* 'name)) #f)
             (display "Here have a cookie! ")
             (ask *player* 'add-thing! *cookie*)
             (display "U receuve a delicios cookie")
             (newline))
            ((not(eq?(ask *player* 'get-thing! (ask *cookie* 'name)) #f))
             (display "U allreadu have a cookie, eat that one first")
             (newline)))))
      
    
    (lambda (msg)
      (cond
        ((eq? msg 'interact) interact)
        (else (parent msg))))))


(define (make-item-personality)
  (let ((parent (make-personality)))    
    
    (define (interact self)
      (let ((name (ask (ask parent 'get-agent) 'name)))
        (display name)
        (display " can't say much!")
        (newline))      
      )    
    (lambda (msg)
      (cond
        ((eq? msg 'interact) interact)
        (else (parent msg))))))


(define (make-locke-personality)
  (let ((parent (make-personality)))
    
    
    (define (interact self)
      (let ((name (ask (ask parent 'get-agent) 'name)))
        (display name)
        (display ": ")
        (if (not (eq?(ask *player* 'get-thing! (ask *rope* 'name)) #f))
            (begin
              (display "You already have what you need.")
              (newline))
            
            (begin
              (display "What does a truly unenlighted man need?")
              
              (let ((answer (read)))
                
                (if (or (equal? answer 'correct) (eq? answer 'flashlight))
                    (begin
                      (display "You are truly a wise man! I will reward you. May the island be with you")
                      (newline)
                      (ask *player* 'add-thing! *flashlight*)
                      (display "You receive a flashlight")
                      (newline))
                    (begin
                      (display "Come back when you're ready...")
                      (newline))))))))
      
      (lambda (msg)
        (cond
          ((eq? msg 'interact) interact)
          (else (parent msg))))))

(define (make-kate-personality)
  (let ((parent (make-personality)))
    
    
    (define (interact self)
      (let ((name (ask (ask parent 'get-agent) 'name)))
        (display name)
        (display ": Hi there, you haven't seen Jack have you? By the way, stay out of the forest.. Somebody said they saw a polar bear there. Probably crazy talk but you never know")
        (newline)        
        ))
      
      (lambda (msg)
        (cond
          ((eq? msg 'interact) interact)
          (else (parent msg))))))
  
(define (make-hurley-personality)
  (let ((parent (make-personality)))
        
    (define (interact self)
      (let ((name (ask (ask parent 'get-agent) 'name)))
        (display name)
        (display ": Hey dude.. Man, sometimes I hear the jungle whisper some numbers.. Do you hear it too?")
        (newline)        
        ))
      
      (lambda (msg)
        (cond
          ((eq? msg 'interact) interact)
          (else (parent msg))))))

(define (make-jack-personality)
  (let ((parent (make-personality)))
        
    (define (interact self)
      (let ((name (ask (ask parent 'get-agent) 'name)))
        (display name)
        (display ": This is very important!! Stay out of the forest.. There is pits and bears and what not. Just stay here and tend to the wounded!")
        (newline)        
        ))
      
      (lambda (msg)
        (cond
          ((eq? msg 'interact) interact)
          (else (parent msg))))))